import { writeFileSync } from 'fs'
import { join } from 'path'
import { envVars } from './validateEnv'

const generateEnvFile = () => {
  const envContent = Object.entries(envVars)
    .map(([key, value]) => `${key}=${value}`)
    .join('\n')

  writeFileSync(join(__dirname, '../../.env'), envContent)
}

export default generateEnvFile
